<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<h1>展示</h1>
<div id="app">
    <template>
        <h1>员工列表</h1>
        <el-table
                :data="user"
                stripe
                style="width: 100%;" >
            <el-table-column type="index" label="编号">
            </el-table-column>
            <el-table-column
                    prop="username"
                    label="姓名"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="password"
                    label="密码"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="nickname"
                    label="昵称" >
            </el-table-column>
              <!-- <el-table-column label="操作">
                   <template slot-scope="scope">
                       <el-button
                               size="mini"
                               type="danger"
                               @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                  </template>
               </el-table-column>-->
        </el-table>
    </template>

</div>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
     <script>
         let v = new Vue({
             el:"#app",
             data: function () {
                 return{
                     user:[{username:"z", password:"s", nickname:"s"}]
                 }

             },

             methods:{

                 handleDelete(i,emp){
                     v.$message("您成功删除了"+emp.name)
                     v.arr.splice(i,1)
                 }
             },
             created:function () {
                 axios.get("/show").then(function (response) {
                     v.user=response.data
                 })

             }

         })
     </script>
</body>

</html>